package com.bkbw.live.battle.bean;

import org.apache.mina.core.session.IoSession;

import com.bkbw.live.battle.business.UnitObject;
import com.bkbw.live.common.dataproto.ClientToBattleServerPb.Vector3d;

/***
 * 副本中的一个玩家对象
 * @author zhouyou
 *
 */
public class PlayerInDungeon {
	private IoSession session;
	private int uid;
	private String username;
	private Vector3d pos;//位置
	private int moveState = 0;//状态 0 站立  1移动中，这个属性用于服务器是否会广播
	
	protected UnitObject unit;
	
	public UnitObject getUnit() {
		return unit;
	}
	public void setUnit(UnitObject unit) {
		this.unit = unit;
	}
	public PlayerInDungeon(IoSession session, int uid, String username) {
		super();
		this.session = session;
		this.uid = uid;
		this.username = username;
	}
	public IoSession getSession() {
		return session;
	}
	public void setSession(IoSession session) {
		this.session = session;
	}
	public int getUid() {
		return uid;
	}
	public void setUid(int uid) {
		this.uid = uid;
	}
	public String getUsername() {
		return username;
	}
	public void setUsername(String username) {
		this.username = username;
	}
	public Vector3d getPos() {
		if(pos==null){
			pos = Vector3d.newBuilder().build();
		}
		return pos;
	}
	public void setPos(Vector3d pos) {
		this.pos = pos;
	}
	public int getMoveState() {
		return moveState;
	}
	public void setMoveState(int moveState) {
		this.moveState = moveState;
	}
}
